package Q6;

import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }

        if (n < 2) {
            System.out.println(0);
            return;
        }

        Arrays.sort(arr);

        if (arr[n - 1] < arr[0] * 2) {
            System.out.println(0);
            return;
        }

        int left = 0, right = n / 2;

//        while (right < n && arr[right] < arr[left] * 2) {
//            right++;
//        }
//
//        if (right >= n) {
//            System.out.println(0);
//            return;
//        }

        int startR = right; // 记录一开始的 right 下标
        int count = 0; //组数
        while (right < n && left < startR) {
            if (arr[right] >= arr[left] * 2) {
                count++;
                right++;
                left++;
            } else {
                right++;
            }
        }

        if (left < startR) {
            System.out.println(0);
        } else {
            System.out.println(count);
        }

        sc.close();
    }
}
